home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!usenet
- From: GHouck <hksys@teleport.com>
- Newsgroups: comp.lang.c
- Subject: Re: writing to .exe file
- Date: 20 Feb 1996 10:36:40 GMT
- Organization: systems hk
- Message-ID: <4gc87o$dm7@maureen.teleport.com>
- References: <4g961o$gdr@ultra.sonic.net>
- NNTP-Posting-Host: ip-pdx04-22.teleport.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- Ted Rollheiser <trollhei@sonic.net> wrote:
- >I would like to save data ( a string ) from one run of a (dos) program
- >to the next by writing it to the .exe file. does this sound doable?
- >
- Ted,
-
- I haven't done it in a long time, but you should be able to do it.
- You probably need to put a 'magic number' in the executable in front
- a data area that you know will be there (like a literal string in front
- of your string area, within a structure), and that your updating program
- can locate while scanning the executable. Stuff a new string into the
- string area, assuming you know where the string area is in relation to the
- magic number.
- Yours, Geoff Houck
-
-